<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改用户信息</title>
</head>
<body>
<?php
$link = new mysqli("localhost","root","74642486","db_user",3306);
$username = $_GET['username'];
$sql="select username from tb_user where username='$username'";
$result=$link->query($sql);
$sql_arr = mysqli_fetch_assoc($result);
?>
<div class="middle" align="center">
    <div class="header"> <h1>修改用户页面</h1> </div>
<form action="action-edit.php" method="post"><table border="0">
        <tr> <td><label>username: </label></td><td><input type="text" name="username" value= <?php echo $sql_arr['username'] ?> readonly="readonly"></td></tr>
        <tr> <td><label>password：</label></td><td><input type="password" name="password" value= <?php echo $sql_arr['password']?> ></td></tr>
        <tr> <td><label>sex：</label></td><td><input type="text" name="sex" value= <?php echo $sql_arr['sex']?>></td></tr>
        <tr> <td><label>qq：</label></td><td><input type="text" name="qq" value= <?php echo $sql_arr['qq']?>></td></tr>
        <tr> <td><label>email：</label></td><td><input type="email" name="email" value="<?php echo $sql_arr['email']?>"></td></tr>
        <tr> <td><label>phone：</label></td><td><input type="text" name="phone" value="<?php echo $sql_arr['phone']?>"></td></tr>
        <tr> <td><label>address：</label></td><td><input type="text" name="address" value="<?php echo $sql_arr['address']?>"></td></tr>
        <tr> <td><td></td><input type="submit" value="提交"> </td></tr>
</form>
</div>
</body>
</html>